package org.example.one.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.one.domain.Account;
import org.example.one.service.AccountService;
import org.example.one.mapper.AccountMapper;
import org.springframework.stereotype.Service;



/**
* @author acer
* @description 针对表【account】的数据库操作Service实现
* @createDate 2025-06-17 14:37:18
*/
@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account>
    implements AccountService{
    @Override
    public boolean getAccount(Account account) {

        if(baseMapper.getAccount(account)==1)return true;
        return false;
    }

    @Override
    public void addAccount(int sid ,String password) {
        Account account = new Account();
        account.setSid(sid);
        account.setPassword(password);
        baseMapper.addAccount(account);
    }

    @Override
    public void putAccount(Integer sid, String newpassword) {
        Account account = new Account();
        account.setSid(sid);
        account.setPassword(newpassword);
        baseMapper.putAccount(account);
    }
}




